<template>
  <div>
    <!-- 面包屑 -->
    <bread :bread="$route.meta.bread"></bread>
    <!-- 表格区域 -->
    <el-table :data="powerList" border>
      <el-table-column label="#">
        <template slot-scope="scope">
          {{ scope.$index + 1 }}
        </template>
      </el-table-column>
      <el-table-column label="权限名称" prop="authName"></el-table-column>
      <el-table-column label="路径" prop="path"></el-table-column>
      <el-table-column label="权限等级">
        <template slot-scope="scope">
          <el-tag v-if="scope.row.level == 0">一级</el-tag>
          <el-tag type="success" v-else-if="scope.row.level == 1">二级</el-tag>
          <el-tag type="warning" v-else>三级</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import bread from "../common/bread.vue";
export default {
  components: { bread },
  data() {
    return {
      powerList: [],
    };
  },
  created() {},
  mounted() {
    //   获取权限列表线上接口
    this.$axios
      .get("https://www.liulongbin.top:8888/api/private/v1/rights/list")
      .then((res) => {
        this.powerList = res.data;
      });
  },
  methods: {},
};
</script>

<style scoped>
</style>
